# coding=utf-8
from framework.base_page import BasePage

class AddInquiryPage(BasePage):
    btn_shipname = "xpath=>//*[@id='ship']/div/span/i"
    input_shipname = "xpath=>//input[@id='ship']"
    btn_terminal = "xpath=>//*[@id='portInfo']/div/span/i"
    input_terminal = "xpath=>//input[@id='portInfo']"
    btn_ordertype = "xpath=>//*[@id='orderType']/div/div/div[1]"
    input_ordertype = "xpath=>//input[@id='orderType']"
<<<<<<< HEAD
    btn_agent = "xpath=>//*[@id='agencies']/div/div/div"
    input_agent = "xpath=>//input[@id='agencies']"
    # btn_selectagent = "xpath=>/html/body/div[6]/div/div/div/ul/li[3]"
    btn_selectagent = "xpath=>/html/body/div[6]/div/div"
    input_VoyageNo = "id=>voyageNumber"
    btn_addservice = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/button[1]"
    input_service_search = "xpath=>/html/body/div[2]/div/div[2]/div/div/div[1]/div/div/div/span/input"
    btn_service = "xpath=>/html/body/div[7]/div/div[2]/div/div/div[2]/div/div"
    btn_service_submit = "xpath=>/html/body/div[3]/div/div[2]/div/div/div[2]/div[2]/div/button[1]"
    btn_X = "xpath=>/html/body/div[2]/div/div[2]/div/div/div[1]/button/i"
    btn_add_customizedService = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[3]/div[1]/div[2]/div[1]/button[2]"
    input_ServiceName = "id=>customName"
    btn_customizedService_submit = "xpath=>/html/body/div[3]/div/div[2]/div/div/div[2]/div[2]/div/button[1]"
    # InquiryNo = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[1]/div[2]/div[3]/span"
    InquiryNo = "//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[1]/div[2]/div[3]/span"
=======
    btn_voyage_number = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[1]/div/div[4]/div/div/div[2]/div/span"
    input_voyage_number = "xpath=>//*[@id='voyageNumber']"
    btn_agent = "xpath=>//*[@id='agencies']/div/div/div"
    input_agent = "xpath=>//input[@id='agencies']"
    btn_selectagent = "xpath=>/html/body/div[6]/div/div/div/ul/li[3]"
    btn_addservice ="xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/button[1]"
    btn_addcustomservice ="xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/button[2]"
>>>>>>> d932c4b2bd4979a7a40e02129a0d09bfc3061eeb
    btn_tempsave = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div/div/div/div/div/div[3]/div/button[1]"
    btn_publish_inquiry = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div/div/div/div/div/div[2]/div/button[2]"
    btn_ETA = "xpath=>//*[@id='arrivalTime']/div/input"
    btn_now = "xpath=>/html/body/div[3]/div/div/div/div/div[2]/div[3]/span/a[1]"
    btn_selecttime = "xpath=>/html/body/div[5]/div/div/div/div/div[2]/div[3]/span/a[1]"
    btn_add_inquiry_black = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[1]/span[2]"
    btn_publish_yes = "xpath=>/html/body/div[8]/div/div[2]/div/div[2]/div/div/div[2]/button[2]"
<<<<<<< HEAD
=======
    btn_back = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[1]/span[1]"

    btn_AGM = "xpath=>/html/body/div[5]/div/div[2]/div/div/div[2]/div/div/a[1]"
    btn_Requirements = "xpath=>/html/body/div[6]/div/div[2]/div/div/div[2]/div[1]/div/div/div[2]/div/div[1]/div[2]/div"
    input_Requirements = "xpath=>//*[@id='requires']"
    btn_submit = "xpath=>/html/body/div[6]/div/div[2]/div/div/div[2]/div[2]/div/button[1]"
    btn_close = "xpath=>/html/body/div[6]/div/div[2]/div/div/div[2]/div[2]/div/button[2]"

    def click_AGM(self):
        self.click(self.btn_AGM)
        self.sleep(2)

    def click_Requirements(self):
        self.click(self.btn_Requirements)
        self.sleep(2)

    def type_input_requirement(self,text):
        self.type(self.input_Requirements,text)
        self.sleep(2)

    def click_submit(self):
        self.click(self.btn_submit)
        self.sleep(2)

    def click_close(self):
        self.click(self.btn_close)
        self.sleep(2)


    def click_voyagenumber(self):
        self.click(self.btn_voyage_number)
        self.sleep(2)

    def type_voyagenumber(self,text):
        self.type(self.input_voyage_number , text)
        self.sleep(2)

    def click_back(self):
        self.click(self.btn_back)
        self.sleep(2)
>>>>>>> d932c4b2bd4979a7a40e02129a0d09bfc3061eeb

    def click_shipname(self):
        self.click(self.btn_shipname)
        self.sleep(2)

    def type_shipname(self, text):
        self.type(self.input_shipname, text)
        self.sleep(2)

    def click_terminal(self):
        self.click(self.btn_terminal)
        self.sleep(2)

    def type_terminal(self, text):
        self.type(self.input_terminal, text)
        self.sleep(2)

    def click_ordertype(self):
        self.click(self.btn_ordertype)
        self.sleep(2)

    def type_ordertype(self, text):
        self.type(self.input_ordertype, text)
        self.sleep(2)

<<<<<<< HEAD
    def type_VoyageNo(self,text):
        self.type(self.input_VoyageNo,text)
        self.sleep(2)

=======
>>>>>>> d932c4b2bd4979a7a40e02129a0d09bfc3061eeb
    def click_agent(self):
        self.click(self.btn_agent)
        self.sleep(2)

    def type_agent(self, text):
        self.type(self.input_agent, text)
        self.sleep(2)

    def click_selectagent(self):
        self.click(self.btn_selectagent)
        self.sleep(2)

    def click_addservice(self):
        self.click(self.btn_addservice)
        self.sleep(2)

<<<<<<< HEAD
    def type_service_search(self,text):
        self.type(self.input_service_search,text)
        self.sleep(2)

    def click_service(self):
        self.click(self.btn_service)
        self.sleep(2)

    def click_service_submit(self):
        self.click(self.btn_service_submit)
        self.sleep(5)

    def click_X(self):
        self.click(self.btn_X)
        self.sleep(2)

=======
>>>>>>> d932c4b2bd4979a7a40e02129a0d09bfc3061eeb
    def click_addcustomservice(self):
        self.click(self.btn_addcustomservice)
        self.sleep(2)

    def click_tempsave(self):
        self.click(self.btn_tempsave)
        self.sleep(2)

    def click_publish_inquiry(self):
        self.click(self.btn_publish_inquiry)
        self.sleep(2)

    def click_eta(self):
        self.click(self.btn_ETA)
        self.sleep(2)

    def click_now(self):
        self.click(self.btn_now)
        self.sleep(2)

    def click_selecttime(self):
        self.click(self.btn_selecttime)
        self.sleep(2)

    def click_inquiry_black(self):
        self.click(self.btn_add_inquiry_black)
<<<<<<< HEAD
        self.sleep(2)

    def click_publish_yes(self):
        self.click(self.btn_publish_yes)
        self.sleep(3)

    def InquiryNo(self):
        self.orderNo(self.InquiryNo)
        self.sleep(2)
=======

    def click_publish_yes(self):
        self.click(self.btn_publish_yes)
>>>>>>> d932c4b2bd4979a7a40e02129a0d09bfc3061eeb
